
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
   
    
</head>
<body>
    <h1>计算</h1>
    <h4>字符串和数字加减乘除的运算结果</h4>
    <p>总结：字符串通过运算符会自动转为数字，但是除了用加法(+)</p>
    <pre>
let c=str1+num1;//23,string+number=string
let c1=num1+str1;//32,string+number=string
let c2=str1*num1;//6,string*number=number
let c3=str1-num1;//-1,string-number=number
let c4=str1/num1;//-1,string/number=number
    </pre>
    <script src="../common.js"></script>
    <script src="fun2.js"></script>
</body>
</html>    
